<table class="tablelist" lay-filter="layerTable" lay-skin="line">
    <thead>
      <tr>
        <th class="xutd" lay-data="{field:'xutdId', width:60,fixed:'left'}">序号</th>
        <th lay-data="{field:'name'}">名称</th>
		<th lay-data="{field:'code'}">字典数据</th>
		<th lay-data="{field:'remarks'}">备注</th>
        <th lay-data="{field:'modifyTime', width:155,fixed:'right'}">更新时间</th>
        <th lay-data="{field:'setting', width:130,fixed:'right'}">操作</th>
      </tr>
    </thead>
    <tbody>
      <#list pager.records as item>
	      <tr>
	        <td>${(item_index+1)+pager.size*(pager.current-1)}</td>
            <td>${item.name}&nbsp;${item.systemParamType.name}</td>
            <td>${item.systemDic.dicType.name}(${item.systemDic.dicType.typeCode})  ${item.systemDic.name}(${item.systemDic.dicValue})</td>
            <td>${item.remarks}</td>
            <td>${item.modifyTime?string("yyyy-MM-dd HH:mm:ss")}</td>
            <td>
                <@shiro.hasPermission name="sysman:systemParam_man:update">
                    <button class="layui-btn layui-btn-small editBtn" type="button" data-id="${item.id}" onclick="toEdit(this);">
                        <i class="layui-icon" title="编辑">&#xe642;</i>
                    </button>
                </@shiro.hasPermission>
                <@shiro.hasPermission name="sysman:systemParam_man:delete">
                    <button class="layui-btn layui-btn-small layui-btn-danger delBtn" type="button" data-id="${item.id}" onclick="toDel(this);">
                        <i class="layui-icon" title="删除">&#xe640;</i>
                    </button>
                </@shiro.hasPermission>
            </td>
	      </tr>
      </#list>
    </tbody>
  </table>
<div id="layer-page"></div>
<script type="text/javascript">
    var pagesize = ${pager.size};
    layui.use(['table', 'laypage'], function(){
        var table = layui.table;
        //转换静态表格
        table.init('layerTable', {
            height: $(window).height() - 220, //设置高度,
            limit:${pager.size}
        });
        var laypage = layui.laypage;
        //执行一个laypage实例
        laypage.render({
            elem: 'layer-page' //注意，这里的 test1 是 ID，不用加 # 号
            ,limits:[20,40,60,80,100,200]
            ,limit:${pager.size}
            ,curr:${pager.current}
            ,count: ${pager.total} //数据总数，从服务端得到
            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            ,jump: function(obj, first){
                console.log(obj.curr);
                console.log(obj.limit);
                //首次不执行
                if(!first){
                    baseSearchQueryLayer(obj.curr,obj.limit);
                    //转换静态表格
                }
            }
        });

        window.onresize = function() {
            $(".zTreeDemoBackground").height($(window).height()-210);
            $("#pageList").width($(window).width()-300);
            $(".rightinfo").height($(window).height()-80);
            //转换静态表格
            table.init('layerTable', {
                height: $(window).height() - 220, //设置高度,
                limit:${pager.size}
            });
        }
    });
    function toDel(obj){
        baseSelDel(obj);
    }
    function toEdit(obj){
        toBaseSelEdit(obj,false,933,530,true);
    }
</script>
<#include "/common/page.ftl">